package com.wk1un2.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.wk1un2.entity.OrderForm;
import com.wk1un2.mapper.OrderFormMapper;
import com.wk1un2.service.OrderFormService;
import com.wk1un2.util.Result;

/**
 * 业务接口的实现类
 * 
 * @author Administrator
 *
 */
@Service // 扫描
public class OrderFormServiceImpl implements OrderFormService {

	@Autowired
	private OrderFormMapper OrderFormMapper;// 自动注入mapper

	@Override
	public List<OrderForm> getAll(int page, int limit, String of_id,String u_name,String of_state) {
		// TODO Auto-generated method stub
		return OrderFormMapper.getAll(page, limit, of_id,u_name, of_state);
	}

	@Override
	public Integer count() {
		// TODO Auto-generated method stub
		return OrderFormMapper.count();
	}

	@Override
	public Integer add(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return OrderFormMapper.add(map);
	}

	@Override
	public Integer update(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return OrderFormMapper.update(map);
	}

	@Override
	public Integer delete(int of_id) {
		// TODO Auto-generated method stub
		return OrderFormMapper.delete(of_id);
	}

	@Override
	public Result updateorderformsendout(Integer of_id, Integer of_sendout) {
		// TODO Auto-generated method stub
		OrderFormMapper.updateorderformsendout(of_id, of_sendout);
		return Result.ok(0);

	}

	@Override
	public List<Map<String, Object>> getId(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return OrderFormMapper.getId(map);
	}

	@Override
	public Integer addOrderForm(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return OrderFormMapper.addOrderForm(map);
	}
}
